package com.roden.study.examples.org.apache.commons;

import org.apache.commons.collections4.ListUtils;
import org.junit.Test;

import java.util.Arrays;
import java.util.List;

/**
 * @Author luodeng
 * @create 2021/9/26 10:49
 */
public class ListTest {
    @Test
    public void part() {
        //common collections 
        List<Integer> intList = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8);
        List<List<Integer>> subs = ListUtils.partition(intList, 3);
        subs.stream().forEach(list -> {
            System.out.println(list.size());
        });
    }
}
